package com.ving.test.mybatis01.excutor;

import com.ving.test.mybatis.session.Configuration;
import com.ving.test.mybatis.statement.StatementHandler;
import com.ving.test.mybatis01.Configuration01;
import com.ving.test.mybatis01.binding.MapperMethod01;
import com.ving.test.mybatis01.statement.StatementHandler01;

/**
 * Created by liuweijie on 2019-11-19.
 */
public class SimpleExecutor01 {

    private Configuration01 configuration;

    public SimpleExecutor01(Configuration01 configuration01) {
        this.configuration =configuration01;
    }

    public <T> T query(MapperMethod01 mapperMethod01, String parameter) {
        System.out.println("===========");

        return new StatementHandler01(configuration).query(mapperMethod01,parameter);

    }
}
